def sum_num(num):
    print(num)
    if num == 1:
        return num
    sum = num
    sum += sum_num(num - 1)
    return sum


print(sum_num(5))
